package com.lanswon.common.enums;


/**  
* @ClassName: AnnouncementType  
* @Description: TODO(公告类型)  
* @author zhangboyun
* @date 2018年12月10日 上午10:06:27  
*    
*/
public enum AnnouncementType {
	ANNOUNCEMENT_OTHER(0, "招标"),
	ANNOUNCEMENT_FINANCIAL(1, "企业"),
	ANNOUNCEMENT_SOCIETY(2, "中标");
	private Integer code;
	private String value;

	private AnnouncementType(Integer code, String value) {
		this.code = code;
		this.value = value;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static String getValueByCode(Integer code) {
		AnnouncementType[] values = AnnouncementType.values();
		for (AnnouncementType formatType : values) {
			Integer typeCode = formatType.getCode();
			if (typeCode.equals(code)) {
				return formatType.getValue();
			}
		}
		return "";
	}
}
